<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditRealEstateTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditRealEstateLabel_realEstateID}" for="realEstateID" />
                    <h:inputText id="realEstateID" value="#{realEstateController.selected.realEstateID}" title="#{bundle.EditRealEstateTitle_realEstateID}" />
                    <h:outputLabel value="#{bundle.EditRealEstateLabel_location}" for="location" />
                    <h:inputText id="location" value="#{realEstateController.selected.location}" title="#{bundle.EditRealEstateTitle_location}" required="true" requiredMessage="#{bundle.EditRealEstateRequiredMessage_location}"/>
                    <h:outputLabel value="#{bundle.EditRealEstateLabel_deposit}" for="deposit" />
                    <h:inputText id="deposit" value="#{realEstateController.selected.deposit}" title="#{bundle.EditRealEstateTitle_deposit}" />
                    <h:outputLabel value="#{bundle.EditRealEstateLabel_price}" for="price" />
                    <h:inputText id="price" value="#{realEstateController.selected.price}" title="#{bundle.EditRealEstateTitle_price}" />
                    <h:outputLabel value="#{bundle.EditRealEstateLabel_priceType}" for="priceType" />
                    <h:inputText id="priceType" value="#{realEstateController.selected.priceType}" title="#{bundle.EditRealEstateTitle_priceType}" />
                    <h:outputLabel value="#{bundle.EditRealEstateLabel_noOfBedrooms}" for="noOfBedrooms" />
                    <h:inputText id="noOfBedrooms" value="#{realEstateController.selected.noOfBedrooms}" title="#{bundle.EditRealEstateTitle_noOfBedrooms}" />
                    <h:outputLabel value="#{bundle.EditRealEstateLabel_noOfBathrooms}" for="noOfBathrooms" />
                    <h:inputText id="noOfBathrooms" value="#{realEstateController.selected.noOfBathrooms}" title="#{bundle.EditRealEstateTitle_noOfBathrooms}" />
                    <h:outputLabel value="#{bundle.EditRealEstateLabel_extraFacilities}" for="extraFacilities" />
                    <h:inputText id="extraFacilities" value="#{realEstateController.selected.extraFacilities}" title="#{bundle.EditRealEstateTitle_extraFacilities}" />
                    <h:outputLabel value="#{bundle.EditRealEstateLabel_modesOfTransport}" for="modesOfTransport" />
                    <h:inputText id="modesOfTransport" value="#{realEstateController.selected.modesOfTransport}" title="#{bundle.EditRealEstateTitle_modesOfTransport}" />
                    <h:outputLabel value="#{bundle.EditRealEstateLabel_furniture}" for="furniture" />
                    <h:inputText id="furniture" value="#{realEstateController.selected.furniture}" title="#{bundle.EditRealEstateTitle_furniture}" />
                    <h:outputLabel value="#{bundle.EditRealEstateLabel_imageURL}" for="imageURL" />
                    <h:inputText id="imageURL" value="#{realEstateController.selected.imageURL}" title="#{bundle.EditRealEstateTitle_imageURL}" />
                    <h:outputLabel value="#{bundle.EditRealEstateLabel_modeOfPayment}" for="modeOfPayment" />
                    <h:inputText id="modeOfPayment" value="#{realEstateController.selected.modeOfPayment}" title="#{bundle.EditRealEstateTitle_modeOfPayment}" />
                    <h:outputLabel value="#{bundle.EditRealEstateLabel_title}" for="title" />
                    <h:inputText id="title" value="#{realEstateController.selected.title}" title="#{bundle.EditRealEstateTitle_title}" />
                    <h:outputLabel value="#{bundle.EditRealEstateLabel_briefeDescription}" for="briefeDescription" />
                    <h:inputText id="briefeDescription" value="#{realEstateController.selected.briefeDescription}" title="#{bundle.EditRealEstateTitle_briefeDescription}" />
                    <h:outputLabel value="#{bundle.EditRealEstateLabel_addDate}" for="addDate" />
                    <h:inputText id="addDate" value="#{realEstateController.selected.addDate}" title="#{bundle.EditRealEstateTitle_addDate}" />
                    <h:outputLabel value="#{bundle.EditRealEstateLabel_isActive}" for="isActive" />
                    <h:inputText id="isActive" value="#{realEstateController.selected.isActive}" title="#{bundle.EditRealEstateTitle_isActive}" />
                    <h:outputLabel value="#{bundle.EditRealEstateLabel_realEstateTypeID}" for="realEstateTypeID" />
                    <h:selectOneMenu id="realEstateTypeID" value="#{realEstateController.selected.realEstateTypeID}" title="#{bundle.EditRealEstateTitle_realEstateTypeID}" required="true" requiredMessage="#{bundle.EditRealEstateRequiredMessage_realEstateTypeID}">
                        <f:selectItems value="#{realEstateTypeController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditRealEstateLabel_createUserID}" for="createUserID" />
                    <h:selectOneMenu id="createUserID" value="#{realEstateController.selected.createUserID}" title="#{bundle.EditRealEstateTitle_createUserID}" >
                        <f:selectItems value="#{member1Controller.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditRealEstateLabel_houseTypeID}" for="houseTypeID" />
                    <h:selectOneMenu id="houseTypeID" value="#{realEstateController.selected.houseTypeID}" title="#{bundle.EditRealEstateTitle_houseTypeID}" >
                        <f:selectItems value="#{houseTypeController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditRealEstateLabel_contactPersonID}" for="contactPersonID" />
                    <h:selectOneMenu id="contactPersonID" value="#{realEstateController.selected.contactPersonID}" title="#{bundle.EditRealEstateTitle_contactPersonID}" >
                        <f:selectItems value="#{contactPersonController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditRealEstateLabel_cityID}" for="cityID" />
                    <h:selectOneMenu id="cityID" value="#{realEstateController.selected.cityID}" title="#{bundle.EditRealEstateTitle_cityID}" required="true" requiredMessage="#{bundle.EditRealEstateRequiredMessage_cityID}">
                        <f:selectItems value="#{citiesController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{realEstateController.update}" value="#{bundle.EditRealEstateSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditRealEstateViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{realEstateController.prepareList}" value="#{bundle.EditRealEstateShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditRealEstateIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
